package com.guchenbo.example.thread;

/**
 * Created by CreGu on 2016/6/15.
 */
public class TestWait {

    public static void main(String[] args) {
        TestWait testWait = new TestWait();
        TestWait testWait2 = new TestWait();
        try {
            synchronized (testWait) {
//                Thread.currentThread().interrupt();
                testWait.wait();
            }

            synchronized (testWait2) {
                testWait2.notify();
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
